const express = require('express')
const app = express()
const config = require('./config/index')
const indexRouter = require('./routes/index');

app.use(express.json());

// 加载路由
app.use('/api', indexRouter);

app.listen(config.port, () => {
  console.log(`当前运行环境: ${process.env.NODE_ENV}`);
  console.log(`Weather server listening on port ${config.port}`);
})
